import  React from 'react'


import  './Pagination.less'






export  default  class  Pagination  extends  React.Component {
    render() {
        // console.log(this.props.myindex)
        let currentIndex=this.props.myindex
        let dots=this.props.dots
        console.log(currentIndex)
        console.log(dots);
        // let arr=[]
        // for(var i=0;i<dots;i++) {
        //   arr.push(i)
        // }
        // console.log(arr)
        let arr=new Array(dots).fill(1)
        console.log(arr)
        return (

            <div className='swiper-pagination'>
                <ul>
                    
                     {/* <li></li> */}

                      {
                           arr.map((item,index)=>{
                            return(
                                <li key={index}  className={currentIndex===index?'selected':''}></li>
                            )
                        })
                      }
                    
                </ul>

            </div>

        )
    }
}



